using System.Collections.Generic;
using ELearningSystem.Gateway.Entities;
using NHibernate;

namespace ELearningSystem.Gateway.Gateway
{
    public class PracticeGateway:CommonGateway
    {
        public IList<Practice> GetAll()
        {
            using (ISession session = createDataBaseSession.OpenSession())
            {
                using (session.BeginTransaction())
                {
                    var practices = session.CreateCriteria(typeof(Practice)).List<Practice>();
                    return practices;
                }
            }
        }
    }
}